home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbb((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbb((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- SLSubmitJob, SLSubmitJobFd, SLSubmitJobBuf, SLSubmitJobSimple - submit a
- job for printing
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssppppoooooooollll....hhhh>>>>
-
- SSSSLLLLPPPPrrrriiiinnnnttttJJJJoooobbbb**** SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbb((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ffffiiiilllleeeennnnaaaammmmeeee,,,,
- ccccoooonnnnsssstttt cccchhhhaaaarrrr ****pppprrrriiiinnnntttteeeerrrr,,,,
- iiiinnnntttt nnnnuuuummmm____ccccooooppppiiiieeeessss,,,, iiiinnnntttt ccccooooppppyyyy,,,,
- iiiinnnntttt mmmmaaaaiiiillll,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ttttiiiittttlllleeee,,,,
- ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ooooppppttttiiiioooonnnnssss))));;;;
-
- SSSSLLLLPPPPrrrriiiinnnnttttJJJJoooobbbb**** SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbbFFFFdddd((((iiiinnnntttt ffffiiiilllleeee____ddddeeeesssscccc,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****pppprrrriiiinnnntttteeeerrrr,,,,
- iiiinnnntttt nnnnuuuummmm____ccccooooppppiiiieeeessss,,,, iiiinnnntttt ccccooooppppyyyy,,,,
- iiiinnnntttt mmmmaaaaiiiillll,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ttttiiiittttlllleeee,,,,
- ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ooooppppttttiiiioooonnnnssss))));;;;
-
- SSSSLLLLPPPPrrrriiiinnnnttttJJJJoooobbbb**** SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbbBBBBuuuuffff((((ccccoooonnnnsssstttt vvvvooooiiiidddd ****bbbbuuuuffffffffeeeerrrr,,,, ssssiiiizzzzeeee____tttt aaaammmmoooouuuunnnntttt,,,,
- ccccoooonnnnsssstttt cccchhhhaaaarrrr ****pppprrrriiiinnnntttteeeerrrr,,,, iiiinnnntttt nnnnuuuummmm____ccccooooppppiiiieeeessss,,,,
- iiiinnnntttt ccccooooppppyyyy,,,, iiiinnnntttt mmmmaaaaiiiillll,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ttttiiiittttlllleeee,,,,
- ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ooooppppttttiiiioooonnnnssss))));;;;
-
- SSSSLLLLPPPPrrrriiiinnnnttttJJJJoooobbbb**** SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbbSSSSiiiimmmmpppplllleeee((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ffffiiiilllleeeennnnaaaammmmeeee))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _S_L_S_u_b_m_i_t_J_o_b submits a file to be printed using the current default
- spooling system.
-
- _S_L_S_u_b_m_i_t_J_o_b_S_i_m_p_l_e also submits a file for printing but uses default
- values for all printing options.
-
- _S_L_S_u_b_m_i_t_J_o_b_F_d submits the contents of the file specified by a file
- descriptor for printing.
-
- _S_L_S_u_b_m_i_t_J_o_b_B_u_f submits the contents of the specified buffer for printing.
-
- _f_i_l_e_n_a_m_e Specifies the pathname of the file to be printed. This
- string can specify multiple files by separating the
- filenames with one or more whitespace characters. Wildcard
- characters may be used but shell job control meta
- characters such as ";" and "&" must not be used. Note
- that it is the responsibility of the caller to verify that
- _f_i_l_e_n_a_m_e does not contain characters that would be
- interpreted as job control meta characters. _l_i_b_s_p_o_o_l does
- not perform this verification.
-
- _f_i_l_e__d_e_s_c Specifies a file descriptor open for reading.
-
- _b_u_f_f_e_r Specifies a buffer to be printed.
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbb((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbb((((3333))))
-
-
-
- _a_m_o_u_n_t Specifies the number of bytes in _b_u_f_f_e_r.
-
- _p_r_i_n_t_e_r Specifies the name of the printer on which the job is to
- be printed. If _p_r_i_n_t_e_r is NNNNUUUULLLLLLLL, the default printer for
- the current spooling system is used.
-
- _n_u_m__c_o_p_i_e_s Specifies the number of copies of the job that are to be
- printed. The value specified must be greater than 0.
-
- _c_o_p_y If set to 1, this parameter specifies that the file to be
- printed should be copied to the spooling directory for the
- destination printer. If set to 0, a link will be created
- in the spooling directory pointing to the real file. If a
- link is created, the user should not change or delete the
- file until it has been printed.
-
- _m_a_i_l If set to 1, this parameter indicates that mail should be
- sent to the user upon completion of printing. If set to 0,
- no mail will be sent.
-
- _t_i_t_l_e Specifies a title to be printed on the banner page of the
- print job. If set to NNNNUUUULLLLLLLL, the system dependent default
- title, if any, will be printed.
-
- _o_p_t_i_o_n_s The file(s) specified to this function are submitted to
- the spooling system print command corresponding to the
- current default spooling system. For System V, _S_L_S_u_b_m_i_t_J_o_b
- executes _l_p(_1) and for BSD, the function executes _l_p_r(_1).
- Each of these spooling system commands allows option flags
- and parameters not covered by the _S_L_S_u_b_m_i_t_J_o_b formal
- parameter list. The _o_p_t_i_o_n_s string provides the means to
- pass parameters that are spooling system specific. The
- string specified is passed unchanged to the appropriate
- spooling system print command. If there are no options to
- be passed to the spooling system, this parameter can be
- set to NNNNUUUULLLLLLLL.
-
- The _S_L_S_u_b_m_i_t_J_o_b_S_i_m_p_l_e function uses the following default printing
- options:
-
- PPPPrrrriiiinnnnttttiiiinnnngggg OOOOppppttttiiiioooonnnn DDDDeeeeffffaaaauuuulllltttt VVVVaaaalllluuuueeee
- ___________________________________________
- Printer Default printer
- Number of copies 1
- Copy or link file Link
- Send mail on completion No mail
- Title None
- Spooler dependent options None
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbb((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbb((((3333))))
-
-
-
- RETURN VALUE
- If an error has occurred during execution of the function, NNNNUUUULLLLLLLL is
- returned. If execution was successful, a pointer to a _S_L_P_r_i_n_t_J_o_b
- structure is returned. This structure contains detailed information about
- the print job. The _S_L_P_r_i_n_t_J_o_b structure is defined as:
-
- typedef struct _slPrintJob {
- unsigned int spooler; /* Spooling system for job */
- /* e.g. SL_SPOOLER_BSD */
- char *printer; /* Local name of printer */
- char *filename; /* File(s) to be printed */
- char *username; /* Job owner user name */
- char *job_id; /* Job ID, where available */
- time_t time_stamp; /* Time when submitted */
- } SLPrintJob;
-
-
- EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
- All job submittal functions will fail under the following general
- circumstances.
-
- SL_ERR_FIND_SPOOLER An error occurred while attempting to determine
- the available printer spooling systems.
-
- SL_ERR_NO_SPOOLERS There are no printer spooling systems available.
-
-
- SL_ERR_NO_DEF_PRINTER There is no default printer registered with the
- printer spooling system.
-
- SL_ERR_SPOOLER_ERROR A printer spooling system error has occurred.
-
- SL_ERR_BAD_PRINTER_NAME The printer name specified is either an empty
- string (""), or a string consisting entirely of
- whitespace.
-
- In addition to the general circumstances, _S_L_S_u_b_m_i_t_J_o_b_S_i_m_p_l_e and
- _S_L_S_u_b_m_i_t_J_o_b will fail under the following circumstances.
-
- SL_ERR_NO_FILENAME The filename specified is either a NULL pointer,
- an empty string ("") or a string consisting
- entirely of whitespace.
-
- _S_L_S_u_b_m_i_t_J_o_b, _S_L_S_u_b_m_i_t_J_o_b_F_d and _S_L_S_u_b_m_i_t_J_o_b_B_u_f will fail if the following
- problems are detected in the job submittal options.
-
- SL_ERR_NUM_COPIES An invalid number of copies to print has been
- specified.
-
- SL_ERR_JOB_COPY An invalid job copy/link parameter has been
- specified.
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbb((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo SSSSLLLLSSSSuuuubbbbmmmmiiiittttJJJJoooobbbb((((3333))))
-
-
-
- SL_ERR_MAIL An invalid mail parameter has been specified.
-
- _S_L_S_u_b_m_i_t_J_o_b_F_d will fail if:
-
- SL_ERR_BAD_FD An invalid file descriptor has been specified.
-
- and _S_L_S_u_b_m_i_t_J_o_b_B_u_f will fail if:
-
- SL_ERR_BAD_BUF An invalid buffer pointer or buffer size has
- been specified.
-
- WWWWAAAARRRRNNNNIIIINNNNGGGG
- The print job pointer returned by the functions points to static storage
- within _l_i_b_s_p_o_o_l. Subsequent calls to the functions will change the
- contents of the job structure. To preserve a job structure, copy the
- structure and contents to a user buffer.
-
- NNNNOOOOTTTTEEEESSSS
- All mention of "fields" refers to the fields of the _S_L_P_r_i_n_t_J_o_b structure.
-
- 1. Under the BSD spooling system, the _j_o_b__i_d field will be set to
- NNNNUUUULLLLLLLL. To determine the job ID under BSD spooling, the printer queue
- must be examined manually.
-
- 2. Under System V spooling, the _j_o_b__i_d field will be set to NNNNUUUULLLLLLLL if the
- -_s flag is passed using the _o_p_t_i_o_n_s parameter.
-
- 3. The _u_s_e_r_n_a_m_e field contains the name of the user submitting the job
- based on the real user id, not the effective user ID. This is
- because the spooling system determines job ownership based on real
- user ID.
-
- 4. The _t_i_m_e__s_t_a_m_p field contains the value returned by the time(2)
- function. Refer to the time(2) and ctime(3) man pages for
- information about the time value and how it may be converted to a
- time string.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- SLCancelJob(3), SLGetQueue(3), SLPerror(3), libspool(3), lp(1), lpr(1)
- time(2), ctime(3)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-